home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / Connections.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  4.2 KB  |  170 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Connections.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__CONNECTIONS__') = 'UNDEFINED' THEN
  18. __CONNECTIONS__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
  22.     include 'Windows.a'
  23.     ENDIF
  24. ;        include 'Memory.a'                                            ;
  25. ;            include 'Types.a'                                        ;
  26. ;                include 'ConditionalMacros.a'                        ;
  27. ;            include 'MixedMode.a'                                    ;
  28. ;        include 'Quickdraw.a'                                        ;
  29. ;            include 'QuickdrawText.a'                                ;
  30. ;        include 'Events.a'                                            ;
  31. ;            include 'OSUtils.a'                                    ;
  32. ;        include 'Controls.a'                                        ;
  33. ;            include 'Menus.a'                                        ;
  34.  
  35.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  36.     include 'Dialogs.a'
  37.     ENDIF
  38. ;        include 'Errors.a'                                            ;
  39. ;        include 'TextEdit.a'                                        ;
  40.  
  41.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  42.     include 'CTBUtilities.a'
  43.     ENDIF
  44. ;        include 'StandardFile.a'                                    ;
  45. ;            include 'Files.a'                                        ;
  46. ;        include 'AppleTalk.a'                                        ;
  47.  
  48. ;    current Connection Manager version    
  49. curCMVersion                    EQU        2
  50. ;    current Connection Manager Environment Record version     
  51. curConnEnvRecVers                EQU        0
  52. ; CMErr 
  53. cmGenericError                    EQU        -1
  54. cmNoErr                            EQU        0
  55. cmRejected                        EQU        1
  56. cmFailed                        EQU        2
  57. cmTimeOut                        EQU        3
  58. cmNotOpen                        EQU        4
  59. cmNotClosed                        EQU        5
  60. cmNoRequestPending                EQU        6
  61. cmNotSupported                    EQU        7
  62. cmNoTools                        EQU        8
  63. cmUserCancel                    EQU        9
  64. cmUnknownError                    EQU        11
  65.  
  66. cmData                            EQU        1 << 0
  67. cmCntl                            EQU        1 << 1
  68. cmAttn                            EQU        1 << 2
  69. cmDataNoTimeout                    EQU        1 << 4
  70. cmCntlNoTimeout                    EQU        1 << 5
  71. cmAttnNoTimeout                    EQU        1 << 6
  72. cmDataClean                        EQU        1 << 8
  73. cmCntlClean                        EQU        1 << 9
  74. cmAttnClean                        EQU        1 << 10
  75. ;        Only for CMRecFlags (not CMChannel) in the rest of this enum    
  76. cmNoMenus                        EQU        1 << 16
  77. cmQuiet                            EQU        1 << 17
  78. cmConfigChanged                    EQU        1 << 18
  79.  
  80. ; CMRecFlags and CMChannel        
  81. ;        Low word of CMRecFlags is same as CMChannel    
  82. cmStatusOpening                    EQU        1 << 0
  83. cmStatusOpen                    EQU        1 << 1
  84. cmStatusClosing                    EQU        1 << 2
  85. cmStatusDataAvail                EQU        1 << 3
  86. cmStatusCntlAvail                EQU        1 << 4
  87. cmStatusAttnAvail                EQU        1 << 5
  88. cmStatusDRPend                    EQU        1 << 6                ; data read pending    
  89. cmStatusDWPend                    EQU        1 << 7                ; data write pending    
  90. cmStatusCRPend                    EQU        1 << 8                ; cntl read pending    
  91. cmStatusCWPend                    EQU        1 << 9                ; cntl write pending    
  92. cmStatusARPend                    EQU        1 << 10                ; attn read pending    
  93. cmStatusAWPend                    EQU        1 << 11                ; attn write pending    
  94. cmStatusBreakPend                EQU        1 << 12
  95. cmStatusListenPend                EQU        1 << 13
  96. cmStatusIncomingCallPresent        EQU        1 << 14
  97. cmStatusReserved0                EQU        1 << 15
  98.  
  99. cmDataIn                        EQU        0
  100. cmDataOut                        EQU        1
  101. cmCntlIn                        EQU        2
  102. cmCntlOut                        EQU        3
  103. cmAttnIn                        EQU        4
  104. cmAttnOut                        EQU        5
  105. cmRsrvIn                        EQU        6
  106. cmRsrvOut                        EQU        7
  107.  
  108. cmSearchSevenBit                EQU        1 << 0
  109.  
  110. cmFlagsEOM                        EQU        1 << 0
  111.  
  112. ConnEnvironRec             RECORD    0
  113. version                     ds.w    1
  114. baudRate                 ds.l    1
  115. dataBits                 ds.w    1
  116. channels                 ds.w    1
  117. swFlowControl             ds.b    1
  118. hwFlowControl             ds.b    1
  119. flags                     ds.w    1
  120. sizeof                     EQU    14
  121.                         ENDR
  122.  
  123. ConnRecord                 RECORD    0
  124. procID                     ds.w    1
  125. flags                     ds.l    1
  126. errCode                     ds.w    1
  127. refCon                     ds.l    1
  128. userData                 ds.l    1
  129. defProc                     ds.l    1
  130. config                     ds.l    1
  131. oldConfig                 ds.l    1
  132. asyncEOM                 ds.l    1
  133. reserved1                 ds.l    1
  134. reserved2                 ds.l    1
  135. cmPrivate                 ds.l    1
  136. bufferArray                 ds.l    8
  137. bufSizes                 ds.l    8
  138. mluField                 ds.l    1
  139. asyncCount                 ds.l    8
  140. sizeof                     EQU    144
  141.                         ENDR
  142.  
  143.  
  144. ; CMIOPB constants and structure 
  145. cmIOPBQType                        EQU        10
  146. cmIOPBversion                    EQU        0
  147.  
  148. CMIOPB                     RECORD    0
  149. qLink                     ds.l    1
  150. qType                     ds.w    1                                    ; cmIOPBQType 
  151. hConn                     ds.l    1
  152. theBuffer                 ds.l    1
  153. count                     ds.l    1
  154. flags                     ds.w    1
  155. userCompletion             ds.l    1
  156. timeout                     ds.l    1
  157. errCode                     ds.w    1
  158. channel                     ds.w    1
  159. asyncEOM                 ds.l    1
  160. reserved1                 ds.l    1
  161. reserved2                 ds.w    1
  162. version                     ds.w    1                                    ; cmIOPBversion 
  163. refCon                     ds.l    1                                    ; for application 
  164. toolData1                 ds.l    1                                    ; for tool 
  165. toolData2                 ds.l    1                                    ; for tool 
  166. sizeof                     EQU    56
  167.                         ENDR
  168.  
  169.     ENDIF ; __CONNECTIONS__
  170.